package cn.shengongying.service.impl;

import cn.shengongying.model.WorkerList;
import cn.shengongying.dao.WorkerListMapper;
import cn.shengongying.service.IWorkerListService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author RXK
 * @since 2022-01-22
 */
@Service
public class WorkerListServiceImpl extends ServiceImpl<WorkerListMapper, WorkerList> implements IWorkerListService {

    private final WorkerListMapper workerListMapper;

    public WorkerListServiceImpl(WorkerListMapper workerListMapper) {
        this.workerListMapper = workerListMapper;
    }


    @Override
    public List<WorkerList> findByUserIds(List<Long> userIds) {
        return workerListMapper.findByUserIds(userIds);
    }

    @Override
    public int countByUserIdAndType(Set<Long> userId, Integer type) {
        return workerListMapper.countByUserIdAndType(userId,type);
    }

    @Override
    public List<WorkerList> findByUserId(Long userId) {
        return workerListMapper.findByUserId(userId);
    }
}
